package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the FUNCTION_ database table.
 * 
 */
@Entity
@Table(name="FUNCTION_")
@NamedQuery(name="Function.findAll", query="SELECT f FROM Function f")
public class Function implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="FUNCTION_ID")
	private long functionId;

	@Column(name="FUNCTION_NAME")
	private String functionName;

	//bi-directional many-to-one association to FunctionType
	@ManyToOne
	@JoinColumn(name="FUNCTION_TYPE_ID")
	private FunctionType functionType;

	//bi-directional many-to-many association to Role
	@ManyToMany(mappedBy="functions")
	private List<Role> roles;

	public Function() {
	}

	public long getFunctionId() {
		return this.functionId;
	}

	public void setFunctionId(long functionId) {
		this.functionId = functionId;
	}

	public String getFunctionName() {
		return this.functionName;
	}

	public void setFunctionName(String functionName) {
		this.functionName = functionName;
	}

	public FunctionType getFunctionType() {
		return this.functionType;
	}

	public void setFunctionType(FunctionType functionType) {
		this.functionType = functionType;
	}

	public List<Role> getRoles() {
		return this.roles;
	}

	public void setRoles(List<Role> roles) {
		this.roles = roles;
	}

}